package com.netx.data;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.netx.generics.time.Moment;
import com.netx.generics.time.Date;
import com.netx.generics.time.Time;
import com.netx.generics.time.DateFormatException;


class Table extends com.netx.generics.sql.Table {

	private final DatabaseDriver _driver;
	
	public Table(ResultSet rs, DatabaseDriver d) throws SQLException {
		super(rs);
		_driver = d;
	}
	
	public Date getDate(int column, int row) throws DateFormatException {
		return getDate(column, row, _driver.getDateFormat());
	}

	public Time getTime(int column, int row) throws DateFormatException {
		return getTime(column, row, _driver.getTimeFormat());
	}

	public Moment getMoment(int column, int row) throws DateFormatException {
		return getMoment(column, row, _driver.getDateTimeFormat());
	}

}
